package disque;
// On utilise la version "non generique" de Comparable

@SuppressWarnings("rawtypes")
public class Disque implements Comparable {
    private int val;

    public Disque (int v) {
	val = v;
    }

    public String toString() {
	return "Disque[" + val + "]";
    }

    public int compareTo(Object v) {
		try {
			Disque d = (Disque)v;
			return val-d.val;
		}
		catch(ClassCastException e) {
			System.err.println("error : " + e.getMessage());
			System.exit(0);
		}
		return 0;
    }
}
